package com.mezz.bones.mcp.server.service.tools;

/**
 * @Author: zhuang
 * @Date: 2025/4/21 11:46
 * @Description: TODO
 * @Version: 1.0
 **/

import com.mezz.bones.mcp.server.annotation.McpTool;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.stereotype.Service;

import java.util.Map;

@McpTool(group = "weather", description = "天气相关工具")
@Service
public class WeatherService {

    @Tool(description = "获取城市天气预报，请使用城市拼音查询")
    public String getWeatherByCity(@ToolParam(description = "城市拼音") String city) {
        Map<String, String> mockData = Map.of(
                "西安", "晴天",
                "北京", "小雨",
                "上海", "大雨"
        );
        return mockData.getOrDefault(city, "抱歉：未查询到对应城市！");
    }

}
